/*
 * @Author: XieQiu 雪球
 * @Date: 2021-05-31 08:57:52
 * @LastEditTime: 2021-05-31 11:25:31
 * @LastEditors: XieQiu 雪球
 * @Description: 农资类型管理接口
 */
import xjaxios from "@/api/axios";

export default {
  /**
   * @description: 获取农资类型树状图数据
   * @param null
   * @return {Object}
   */

  getAgriMateTypeList(farmingTypeNo) {
    return xjaxios.get(`/agriculturalMaterialType/queryTreeList/${farmingTypeNo}`);
  },
  /**
   * @description: 新增农资类型信息
   * @param {Object} formData *
   * @return {Object}
   */
  addAgriMateTypeInfo(formData) {
    return xjaxios.post("/agriculturalMaterialType/add", formData);
  },
  /**
   * @description: 编辑农资类型信息
   * @param {Object} formData *
   * @return {Object}
   */
  editAgriMateTypeInfo(formData) {
    return xjaxios.post("/agriculturalMaterialType/edit", formData);
  },

  // /**
  //  * @description: 批量删除数据
  //  * @param {Array} list *
  //  * @return {Object}
  //  */
  delAgriMateTypeInfo(list) {
    return xjaxios.post("/agriculturalMaterialType/delList", {
      agriculturalMaterialTypeIdList: list
    });
  },

  // /**
  //  * @description: 查询所有入库类型
  //  * @param null *
  //  * @return {Object}
  //  */
  queryAgriMateTypeList() {
    return xjaxios.get("/agriculturalMaterialType/queryList");
  },

  /**
   * @description: 主键查询农资类型信息
   * @param {String}  *
   * @return {Object}
   */
  queryAgriMateTypeById(agriculturalMaterialTypeId) {
    return xjaxios.get(
      `/agriculturalMaterialType/query/${agriculturalMaterialTypeId}`
    );
  }
};
